﻿using System.Collections.ObjectModel;
using TeacherLeftHand.Model;

namespace TeacherLeftHand.DataAccess
{
    public interface IDataAccessor
    {
        /// <summary>
        /// Search base on search condition
        /// </summary>
        ObservableCollection<IData> Search(ISearchCondition searchCondition);

        /// <summary>
        /// Get all items from database
        /// </summary>
        ObservableCollection<IData> GetAll();

        /// <summary>
        /// Add a new item
        /// </summary>
        bool Add(IData item);

        /// <summary>
        /// Delete an item
        /// </summary>
        bool Delete(IData item);

        /// <summary>
        /// Update item
        /// </summary>
        bool Update(IData item);

        /// <summary>
        /// Check if the item already existed
        /// </summary>
        bool ContainsItem(IData item);
    }
}
